<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8" isELIgnored="false"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="chtml" uri="http://www.szhelper.com/jsp/html"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-CN" lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>列表</title>
<script type="text/javascript">
function resend()
{	
	var checked_ids = new Array();
	var ids = document.getElementsByName('id4smsloglist');
	for(i=0;i<ids.length;i++)
	{
		if(ids[i].checked) checked_ids.push(ids[i].value);
	}
	if(checked_ids==null||checked_ids.length==0)
	{
		alert("请选择要重发的短信!");	
		return;
	}
	alert("调用发送接口。。。");
	document.getElementById("ids").value=checked_ids;
	document.forms['smsResendForm'].submit();
		
}
</script>
</head>
<body>
<div class="youarehere">会员管理 &gt; <span>查询短信日志</span></div>
<div id="content">
<form action='<chtml:path path="/" />sm/list' method="post" id="smsLogForm">
<table width="99%" align="center" border="1" cellpadding="0"
	cellspacing="0" class="data_table">
	<tr>
		<td class="data_tab_th" colspan="4">查询短信发送日志</td>
	</tr>
	<tr>
		<td class="data_tab_tdr">手机</td>
		<td class="data_tab_tdl"><input type="text" value="${mobile}" name="mobile" /></td>
		<td class="data_tab_tdr">内容</td>
		<td class="data_tab_tdl"><input type="text" value="${content}" name="content" /></td>
	</tr>
	<tr>
		<td class="data_tab_tdr">短信类型</td>
		<td class="data_tab_tdl"><chtml:enum name="stype" defaultOption="--全部--" defaultValue=""
			selected="${requestScope.type}" textProperty="text"
			type="com.hengpeng.itfinbase.persist.SmsLog$SmsLogType" /></td>
		<td class="data_tab_tdr">短信状态</td>
		<td class="data_tab_tdl"><chtml:enum name="sstate" defaultOption="--全部--" defaultValue=""
			selected="${requestScope.state}" textProperty="text"
			type="com.hengpeng.itfinbase.persist.SmsLog$SmsLogState" /></td>
	</tr>
	<tr>
		<td class="data_tab_tdr">发送时间</td>
		<td class="data_tab_tdl"><input type="text" value="${sendTime1}" name="sendTime1" id="sendTime1" readonly /><script type="text/javascript">Calendar.showDate("sendTime1");</script>&nbsp;到&nbsp;<input type="text" value="${sendTime2}" name="sendTime2" id="sendTime2" readonly /><script type="text/javascript">Calendar.showDate("sendTime2");</script></td>
		<td class="data_tab_tdr">成功时间</td>
		<td class="data_tab_tdl"><input type="text" value="${successTime1}" name="successTime1" id="successTime1" readonly /><script type="text/javascript">Calendar.showDate("successTime1");</script>&nbsp;到&nbsp;<input type="text" value="${successTime2}" name="successTime2" id="successTime2" readonly /><script type="text/javascript">Calendar.showDate("successTime2");</script></td>
	</tr>
	<tr>
		<td colspan="4" class="bg_bai">

		<div class="mr_20 t_c">
			<input type="submit" class="pub_bt" value="查询" onclick='document.getElementsByName("PaginationButton_CurrentPage4list")[0].value=1;'/>
			<input type="button" class="pub_bt" value="清空" onclick="this.form.reset();" />
		</div>
		
	    </td>
	</tr>
</table>
<br />

<!-- 自定义标签示例 -->
<chtml:list collection="smsloglist"
	type="com.hengpeng.itfinbase.persist.SmsLog" linkTarget="_self"
	includeFields="mobile,content,sendTime,successTime,retryCount,type,state" fieldWidth="60,120,120,120,120,120,120"
	showCheckBox="true" title="短信日志列表" paginationName="smslogListPage"
	allowSort="false" >
     
	<input type="button" value="新增" onclick="javascript:location.href='/sm/new'" />
	 
	<input type="button" value="重新发送" onclick="javascript:resend()" />
</chtml:list></form>
</div>
<form action='<chtml:path path="/" />sm/resend' method="post" id="smsResendForm">
	<input type="hidden" name="ids" id="ids" />
</form>
<!--说明   -->	
<div class="sm_info">
	<p class="row_one">说明：</p>
	<p class="other"></p>
	<p class="other"></p>
</div>

</body>
</html>
